home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
prog_gen
/
gcoope10.zip
/
LATEADDS.TXT
< prev
next >
Wrap
Text File
|
1994-07-23
|
2KB
|
46 lines
GCOOPE Version 1.0
July 24, 1994
Several last minute upgrades have been added to the GCOOPE
system and do not appear in the documentation. There is a
new kernel function defined in class.c. This function is
cpyGMas, it is used to effectively rename a generic function
in order to eliminate generic name conflicts and/or rename
a generic function to reflect a new context meaning.
This function does not affect the original generic function
but rather adds a new generic function which uses a particular
method of the original generic function. The prototype is:
stat cpyGMas(object currentClassObjectHandle,
generic newGenericFunctionName,
object owningClassOfMethod,
generic originalGenericName);
Examples of its use can be seen in the RENGM macro
given in gcoope10.h and in the class definitions Dynmem and
Collect(ion).
Another modification is to the Puts and Gets generic
functions, while they perform similarly to the ANSI C library
functions fputs/fgets they take/return String objects rather than
character pointers. Puts will attempt to translate the passed
object into a String object.
In part because of the modifications to Puts and Gets,
another new kernel function has been defined: bounceBack.
object bounceBack(object,...);
This function simply returns the first parameter, hence
the name bounceBack. It is provided so that any attempt to
translate an object into its own class type can perform
successfully. In other words,
g(asString)(anyStringObjectInstance)
will return a String class object given
by anyStringObjectInstance. This approach avoids the need for
checks of class type in routines desiring type translation.